import KernelApi from './api/kernelapi';

export const kernel = KernelApi.getInstance();
export * as common from './common';
export { Command } from './common/command';
export { command } from './common/command';
export { List } from './common/linq';
export * as model from './model';
export * as schema from './schema';
/** 解析头像 */
export const parseAvatar = (avatar?: string) => {
  if (avatar) {
    try {
      return JSON.parse(avatar);
    } catch {
      return undefined;
    }
  }
  return undefined;
};

export const orginoneAvatar = () => {
  return {
    size: 195260,
    name: 'logo3.jpg',
    extension: '.jpg',
    shareLink:
      'p2_llrgzcgn-2hu-2lgzzhaz2nl-_hc2lsontwk8tenvwxe-lhoe2gi6lpmj-gqyk9orts9zfyxptzxlxfxwks9zvst9uybgrpnrxwo2ztfzvhazd',
    thumbnail:
      '',
  };
};
